/*
 * @Author: wuqingchun
 * @Date: 2025-01-21 10:50:23
 * @Description: 
 * @LastEditors: wuqingchun
 * @LastEditTime: 2025-01-21 18:00:11
 */
#include <stdlib.h>

#include "rpc_client.h"

#include "rpc_msg.h"

int main(int argc, char** argv)
{
    RPCClient client;
    const char* pcURL = "tcp://192.168.56.102:8080";

    int32_t iFuncID = FUNC_ID_ADD;
    if (argc > 1)
    {
        iFuncID = atoi(argv[1]);
    }

    int32_t iArg1 = 100;
    if (argc > 2)
    {
        iArg1 = atoi(argv[2]);
    }

    int32_t iArg2 = 200;
    if (argc > 3)
    {
        iArg2 = atoi(argv[3]);
    }

    client.Init(pcURL);
    client.Call(iFuncID, iArg1, iArg2);
    client.Recv();

    return 0;
}